{if $rc}
<rss version="2.0">
    <channel>
    	<title>{$rc->get_title()}</title>
        <link>{$_current_protocol }://{$_current_host}/{$feed_rel_path}</link>
        <description>{$rc->get_description()}</description>
        <generator>TangraCMS 1.0</generator>
        {if $rc->get_language()}<language>{$rc->get_language()}</language>{/if}
        {if $rc->get_copyright()}<copyright>{$rc->get_copyright()}</copyright>{/if}
        {if $rc->get_managing_editor()}<managingEditor>{$rc->get_managing_editor()}</managingEditor>{/if}
        {if $rc->get_web_master()}<webMaster>{$rc->get_web_master()}</webMaster>{/if}

        <pubDate>{$pubdate}</pubDate>
        <lastBuildDate>{$last_build_date}</lastBuildDate>

{foreach from=$items item=item}
        <item>
        	<title><![CDATA[{$item.ci.title}]]></title>
            <link>{$_current_protocol }://{$_current_host}/{$item.path}</link>
            <description><![CDATA[{$item.ci.intro}]]></description>
            <category><![CDATA[{$category}]]></category>
            <guid>{$item.path}</guid>
            <pubDate>{$item.ci.created}</pubDate>
        </item>
{/foreach}
    </channel>
</rss>
{else}
<rss version="2.0">
    <channel>
    	<title>No such RSS channel</title>
        <link>no such channel</link>
        <description>No such channel or server error occured.</description>
        <generator>TangraCMS 1.0</generator>
    </channel>
</rss>
{/if}